package creational.singleton.eagerman;

import creational.singleton.Singleton;

/**
 * 单例模式
 * 饿汉式2
 * @author binbin
 * @since 2022/10/4 14:21
 */
public class EagerManSingleton2 implements Singleton {
    private static EagerManSingleton2 instance;

    static {
        instance = new EagerManSingleton2();
    }

    private EagerManSingleton2() {
    }

    public static EagerManSingleton2 getInstance() {
        return instance;
    }
}
